Block Artifact Suppression in Video Coding

ABSTRACT

A method for encoding a video sequence in a video encoder is provided that includes adapting a quantization parameter of a block of pixels in a picture of the video sequence based on a transform block size of the block of pixels to determine a final quantization parameter, and quantizing transform coefficients of the block of pixels using the final quantization parameter.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. Provisional Patent ApplicationSer. No. 61/638,248, filed Apr. 25, 2012, and U.S. Provisional PatentApplication Ser. No. 61/642,002, filed May 3, 2012, which areincorporated herein by reference in their entirety.

This application may be related to United States Patent ApplicationPublication No. 2011/0122942, filed Nov. 20, 2010, which is incorporatedherein by reference in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention generally relate to block artifactsuppression in video coding.

2. Description of the Related Art

Video compression, i.e., video coding, is an essential enabler fordigital video products as it enables the storage and transmission ofdigital video. In general, video compression techniques applyprediction, transformation, quantization, and entropy coding tosequential blocks of pixels in a video sequence to compress, i.e.,encode, the video sequence. Video decompression techniques generallyperform the inverse of these operations in reverse order to decompress,i.e., decode, a compressed video sequence.

The Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T WP3/16and ISO/IEC JTC 1/SC 29/WG 11 is currently developing thenext-generation video coding standard referred to as High EfficiencyVideo Coding (HEVC). HEVC is expected to provide around 45% improvementin coding efficiency over the current standard, H.264/AVC, as well aslarger resolutions and higher frame rates. The improved codingefficiency is in part due to advanced intra and inter predictiontechniques with a large coding unit (LCU) of up to 64'64 in size, largetransform units (TU) up to 32×32 in size, rate-distortion optimizedquantization, and improved loop filtering including deblocking filteringand sample adaptive offset (SAO), filtering. Even though both objectiveand subjective quality is significantly improved, some annoying visualartifacts are introduced. One such artifact is strong blockiness around32×32 TU boundaries when high frequency transform coefficients arecoarsely quantized.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer-readable media for block artifact suppression in video coding.In one aspect, a method for encoding a video sequence in a video encoderis provided that includes adapting a quantization parameter of a blockof pixels in a picture of the video sequence based on a transform blocksize of the block of pixels to determine a final quantization parameter,and quantizing transform coefficients of the block of pixels using thefinal quantization parameter.

In one aspect, an apparatus for encoding a video sequence is providedthat includes means for adapting a quantization parameter of a block ofpixels in a picture of the video sequence based on a transform blocksize of the block of pixels to determine a final quantization parameter,and means for quantizing transform coefficients of the block of pixelsusing the final quantization parameter.

In one aspect, a non-transitory computer readable medium storingsoftware instructions is provided. The software instructions, whenexecuted by a processor, cause a method for encoding a video sequence tobe performed that includes adapting a quantization parameter of a blockof pixels in a picture of the video sequence based on a transform blocksize of the block of pixels to determine a final quantization parameter,and quantizing transform coefficients of the block of pixels using thefinal quantization parameter.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 is an example;

FIG. 2 is a flow diagram of a prior art method for perceptualquantization;

FIG. 3 is a block diagram of a digital system;

FIG. 4 is a block diagram of a video encoder;

FIG. 5 is a flow diagram of a method; and

FIG. 6 is a block diagram of an illustrative digital system.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

As used herein, the term “picture” may refer to a frame or a field of aframe. A frame is a complete image captured during a known timeinterval. For convenience of description, embodiments are describedherein in reference to HEVC. One of ordinary skill in the art willunderstand that embodiments of the invention are not limited to HEVC.

As used herein, the term ‘activity’ refers to the extent of variation inthe values of pixels contained in a block of video data. Thus, ingeneral, a block with higher ‘activity’ has greater variation in pixelvalues, and will have more higher-frequency components (in terms ofvariation in the pixel values) than low-frequency components. Incontrast, a block with lower ‘activity’ has lesser variation in pixelvalues, and will have more low-frequency components than high-frequencycomponents.

In HEVC, a largest coding unit (LCU) is the base unit used forblock-based coding. A picture is divided into non-overlapping LCUs. Thatis, an LCU plays a similar role in coding as the macroblock ofH.264/AVC, but it may be larger, e.g., 32×32, 64×64, etc. An LCU may bepartitioned into coding units (CU). A CU is a block of pixels within anLCU and the CUs within an LCU may be of different sizes. Thepartitioning is a recursive quadtree partitioning. The quadtree is splitaccording to various criteria until a leaf is reached, which is referredto as the coding node or coding unit. The maximum hierarchical depth ofthe quadtree is determined by the size of the smallest CU (SCU)permitted. The coding node is the root node of two trees, a predictiontree and a transform tree. A prediction tree specifies the position andsize of prediction units (PU) for a coding unit. A transform treespecifies the position and size of transform units (TU) for a codingunit. A transform unit may not be larger than a coding unit and the sizeof a transform unit may be, for example, 4×4, 8×8, 16×16, and 32×32. Thesizes of the transforms units and prediction units for a CU aredetermined by the video encoder during prediction based on minimizationof rate/distortion costs.

Various versions of HEVC are described in the following documents, whichare incorporated by reference herein: T. Wiegand, et al., “WD3: WorkingDraft 3 of High-Efficiency Video Coding,” JCTVC-E603, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG11, Geneva, CH, Mar. 16-23, 2011 (“WD3”), B. Bross,et al., “WD4: Working Draft 4 of High-Efficiency Video Coding,”JCTVC-F803_d6, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Torino, IT, July 14-22, 2011(“WD4”), B. Bross. et al., “WD5: Working Draft 5 of High-EfficiencyVideo Coding,” JCTVC-G1103_d9, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Geneva, CH, Nov.21-30, 2011 (“WD5”), B. Bross, et al., “High Efficiency Video Coding(HEVC) Text Specification Draft 6,” JCTVC-H1003, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG1, Geneva, CH, Nov. 21-30, 2011 (“HEVC Draft 6”), B. Bross,et al., “High Efficiency Video Coding (HEVC) Text Specification Draft7,” JCTVC-11003_d0, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG1, Geneva, CH, April 27-May 7,2012 (“HEVC Draft 7”), B. Bross, et al., “High Efficiency Video Coding(HEVC) Text Specification Draft 8,” JCTVC-J1003_d7, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG1, Stockholm, SE, Jul. 11-20, 2012 (“HEVC Draft 8”), and B.Bross, et al., “High Efficiency Video Coding (HEVC) Text SpecificationDraft 9,” JCTVC-K1003_v7, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG1, Shanghai, CN, Oct.10-19, 2012 (“HEVC Draft 9”).

As previously discussed, strong block artifacts are observed around32×32 TU boundaries when high frequency transform coefficients arecoarsely quantized. This may occur because coarser quantization for thisTU size can increase any discontinuities from neighboring TUs. FIG. 1 isan example illustrating strong blocking artifacts at 32×32 TUboundaries.

One well known way to improve visual quality (and reduce blockingartifacts) that has been used in H.264/AVC is perceptual quantization(sometimes also referred to as adaptive quantization). In perceptualquantization, the quantization parameter (QP) values for blocks in aframe are varied to distribute the noise and artifacts according tomasking properties of the human visual system (HVS). The goal is tomaximize the visual quality of an encoded video sequence while keepingthe bit rate low. For example, according to HVS theory, the human visualsystem performs texture masking (also called detail dependence, spatialmasking or activity masking). That is, the discrimination threshold ofthe human eye increases with increasing picture detail, making the humaneye less sensitive to quantization noise and coding artifacts in busy orhighly textured portions of frames and more sensitive in flat orlow-textured portions.

During video encoding, this texture masking property of the HVS can beexploited by shaping the quantization noise in the video frame based onthe texture content (also referred to as activity) in the differentparts of the video frame. More specifically, the quantization step sizecan be increased in highly textured portions, resulting in coarserquantization and a lower bit rate requirement, and can be decreased inlow-textured or flat portions to maintain or improve video quality,resulting in finer quantization but a higher bit rate requirement. Thehuman eye will perceive a “noise-shaped” video frame as having bettersubjective quality than a video frame which has the same amount of noiseevenly distributed throughout the video frame.

FIG. 2 illustrates a typical prior art technique for perceptualquantization as used in H.264/AVC. For each macroblock, a block activitymeasure (act) is computed. A decision is then made based on the blockactivity measure as to whether or not the base quantization parameter(base QP) as determined by rate control for the macroblock is to bechanged, and if it is to be changed, by how much. For example, inmacroblocks with high activity measures, the base QP may be increased toreduce bit rate as typically coding artifacts are less visible in suchcomplex areas. In macroblocks with low activity measures, which isindicative of a smooth area in which coding artifacts may be morevisible, the base QP may be reduced to improve visual quality. U.S. Pat.App. Pub. No. 2011/0122942 describes various embodiments of this priortechnique for perceptual quantization, along with various methods formeasuring macroblock activity and modulating base QP based on themeasured activity.

Embodiments of the invention provide for perceptual quantization thatdetermines quantization parameters for coding units based both on CUactivity measures and transform unit (TU) size. More specifically, for aCU with the largest TU size, e.g., 32×32, the base quantizationparameter may be modulated (adapted) based on activity measured in theCU and based on the TU size. Consideration of the TU size allows the QPfor CUs having the largest TU size, e.g., 32×32, to be decreased (madeless coarse) to suppress discontinuities from neighboring CUs and thusdecrease blocking artifacts.

FIG. 3 shows a block diagram of a digital system that includes a sourcedigital system 300 that transmits encoded video sequences to adestination digital system 302 via a communication channel 316. Thesource digital system 300 includes a video capture component 304, avideo encoder component 306, and a transmitter component 308. The videocapture component 304 is configured to provide a video sequence to beencoded by the video encoder component 306. The video capture component304 may be, for example, a video camera, a video archive, or a videofeed from a video content provider. In some embodiments, the videocapture component 304 may generate computer graphics as the videosequence, or a combination of live video, archived video, and/orcomputer-generated video.

The video encoder component 306 receives a video sequence from the videocapture component 304 and encodes it for transmission by the transmittercomponent 308. The video encoder component 306 receives the videosequence from the video capture component 304 as a sequence of pictures,divides the pictures into largest coding units (LCUs), and encodes thevideo data in the LCUs. The video encoder component 306 may beconfigured to perform a method for determining quantization parametersbased on transform unit size during the encoding process as describedherein. An embodiment of the video encoder component 306 is described inmore detail herein in reference to FIG. 4.

The transmitter component 308 transmits the encoded video data to thedestination digital system 302 via the communication channel 316. Thecommunication channel 316 may be any communication medium, orcombination of communication media suitable for transmission of theencoded video sequence, such as, for example, wired or wirelesscommunication media, a local area network, or a wide area network.

The destination digital system 302 includes a receiver component 310, avideo decoder component 312 and a display component 314. The receivercomponent 310 receives the encoded video data from the source digitalsystem 300 via the communication channel 316 and provides the encodedvideo data to the video decoder component 312 for decoding. The videodecoder component 312 reverses the encoding process performed by thevideo encoder component 306 to reconstruct the LCUs of the videosequence.

The reconstructed video sequence is displayed on the display component314. The display component 314 may be any suitable display device suchas, for example, a plasma display, a liquid crystal display (LCD), alight emitting diode (LED) display, etc.

In some embodiments, the source digital system 300 may also include areceiver component and a video decoder component and/or the destinationdigital system 302 may include a transmitter component and a videoencoder component for transmission of video sequences both directionsfor video streaming, video broadcasting, and video telephony. Further,the video encoder component 306 and the video decoder component 312 mayperform encoding and decoding in accordance with one or more videocompression standards. The video encoder component 306 and the videodecoder component 312 may be implemented in any suitable combination ofsoftware, firmware, and hardware, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc.

FIG. 4 is a block diagram of the LCU processing portion of an examplevideo encoder, e.g., the video encoder component of FIG. 3, withfunctionality to determine quantization parameters for CUs based on TUsize in the CU. An input digital video sequence is provided to a codingcontrol component (not shown), e.g., from a video capture component 304(see FIG. 3). The coding control component sequences the variousoperations of the video encoder, i.e., the coding control component runsthe main control loop for video encoding. For example, the codingcontrol component performs processing on the input video sequence thatis to be done at the picture level, such as determining the coding type(I, P, or B) of a picture based on a high level coding structure, e.g.,IPPP, IBBP, hierarchical-B, and dividing a picture into LCUs for furtherprocessing.

In addition, for pipelined architectures in which multiple LCUs may beprocessed concurrently in different components of the LCU processing,the coding control component controls the processing of the LCUs byvarious components of the LCU processing in a pipeline fashion. Forexample, in many embedded systems supporting video processing, there maybe one master processor and one or more slave processing modules, e.g.,hardware accelerators. The master processor operates as the codingcontrol component and runs the main control loop for video encoding, andthe slave processing modules are employed to off load certaincompute-intensive tasks of video encoding such as motion estimation,motion compensation, intra prediction mode estimation, transformationand quantization, entropy coding, and loop filtering. The slaveprocessing modules are controlled in a pipeline fashion by the masterprocessor such that the slave processing modules operate on differentLCUs of a picture at any given time. That is, the slave processingmodules are executed in parallel, each processing its respective LCUwhile data movement from one processor to another is serial.

The coding control component includes functionality to perform ratecontrol for generation of the compressed bit stream. As part of ratecontrol, the coding control component generates base quantizationparameters (base QPs) to be used for quantization of the transformcoefficients of coding units. Any suitable technique for rate controlmay be used. As is explained in more detail herein, the quantizationcomponent 406 may adapt the base quantization parameter based onactivity (texture) measured in a CU and on TU size in the CU.

The LCU processing receives LCUs 400 of the input video sequence fromthe coding control component and encodes the LCUs 400 under the controlof the coding control component to generate the compressed video stream.The LCUs 400 in each picture are processed in row order. The LCUs 400from the coding control component are provided as one input of a motionestimation component (ME) 420, as one input of an intra-predictionestimation component (IPE) 424, and to a positive input of a combiner402 (e.g., adder or subtractor or the like). Further, although notspecifically shown, the prediction mode of each picture as selected bythe coding control component is provided to a mode decision component428 and the entropy coding component 436.

The storage component 418 provides reference data to the motionestimation component 420 and to the motion compensation component 422.The reference data may include one or more previously encoded anddecoded pictures, i.e., reference pictures.

The motion estimation component 420 provides motion data information tothe motion compensation component 422 and the entropy coding component436. More specifically, the motion estimation component 420 performstests on CUs in an LCU based on multiple inter-prediction modes (e.g.,skip mode, merge mode, and normal or direct inter-prediction), PU sizes,and TU sizes using reference picture data from storage 418 to choose thebest CU partitioning, PU/TU partitioning, inter-prediction modes, motionvectors, etc. based on coding cost, e.g., a rate distortion coding cost.To perform the tests, the motion estimation component 420 may divide anLCU into CUs according to the maximum hierarchical depth of thequadtree, and divide each CU into PUs according to the unit sizes of theinter-prediction modes and into TUs according to the transform unitsizes, and calculate the coding costs for each PU size, prediction mode,and transform unit size for each CU. The motion estimation component 420provides the motion vector (MV) or vectors and the prediction mode foreach PU in the selected CU partitioning to the motion compensationcomponent (MC) 422.

The motion compensation component 422 receives the selectedinter-prediction mode and mode-related information from the motionestimation component 420 and generates the inter-predicted CUs. Theinter-predicted CUs are provided to the mode decision component 428along with the selected inter-prediction modes for the inter-predictedPUs and corresponding TU sizes for the selected CU/PU/TU partitioning.The coding costs of the inter-predicted CUs are also provided to themode decision component 428.

The intra-prediction estimation component 424 (IPE) performsintra-prediction estimation in which tests on CUs in an LCU based onmultiple intra-prediction modes, PU sizes, and TU sizes are performedusing reconstructed data from previously encoded neighboring CUs storedin a buffer (not shown) to choose the best CU partitioning, PU/TUpartitioning, and intra-prediction modes based on coding cost, e.g., arate distortion coding cost. To perform the tests, the intra-predictionestimation component 424 may divide an LCU into CUs according to themaximum hierarchical depth of the quadtree, and divide each CU into PUsaccording to the unit sizes of the intra-prediction modes and into TUsaccording to the transform unit sizes, and calculate the coding costsfor each PU size, prediction mode, and transform unit size for each PU.The intra-prediction estimation component 424 provides the selectedintra-prediction modes for the PUs, and the corresponding TU sizes forthe selected CU partitioning to the intra-prediction component (IP) 426.The coding costs of the intra-predicted CUs are also provided to theintra-prediction component 426.

The intra-prediction component 426 (IP) receives intra-predictioninformation, e.g., the selected mode or modes for the PU(s), the PUsize, etc., from the intra-prediction estimation component 424 andgenerates the intra-predicted CUs. The intra-predicted CUs are providedto the mode decision component 428 along with the selectedintra-prediction modes for the intra-predicted PUs and corresponding TUsizes for the selected CU/PU/TU partitioning. The coding costs of theintra-predicted CUs are also provided to the mode decision component428.

The mode decision component 428 selects between intra-prediction of a CUand inter-prediction of a CU based on the intra-prediction coding costof the CU from the intra-prediction component 426, the inter-predictioncoding cost of the CU from the motion compensation component 422, andthe picture prediction mode provided by the coding control component.Based on the decision as to whether a CU is to be intra- or inter-coded,the intra-predicted PUs or inter-predicted PUs are selected. Theselected CU/PU/TU partitioning with corresponding modes and other moderelated prediction data (if any) such as motion vector(s) and referencepicture index (indices), are provided to the entropy coding component436.

The output of the mode decision component 428, i.e., the predicted PUs,is provided to a negative input of the combiner 402 and to the combiner438. The associated transform unit size is also provided to thetransform component 404. The combiner 402 subtracts a predicted PU fromthe original PU. Each resulting residual PU is a set of pixel differencevalues that quantify differences between pixel values of the original PUand the predicted PU. The residual blocks of all the PUs of a CU form aresidual CU for further processing.

The transform component 404 performs block transforms on the residualCUs to convert the residual pixel values to transform coefficients andprovides the transform coefficients to a quantization component 406.More specifically, the transform component 404 receives the transformunit sizes for the residual CU and applies transforms of the specifiedsizes to the CU to generate transform coefficients. Further, thequantization component 406 quantizes the transform coefficients based onbase quantization parameters (base QPs) provided by the coding controlcomponent and the transform sizes and provides the quantized transformcoefficients to the entropy coding component 436 for coding in the bitstream. To determine the actual quantization parameter for a CU, thequantization component 406 may adapt (modulate) the base QP based onactivity (texture) in the CU and based on the TU size used for the CU. Amethod for modulating base QP based on activity and TU size that may beperformed by the quantization component 406 is described herein inreference to FIG. 5.

The entropy coding component 436 entropy encodes the relevant data,i.e., syntax elements, output by the various encoding components and thecoding control component using context-adaptive binary arithmetic coding(CABAC) to generate the compressed video bit stream. Among the syntaxelements that are encoded are picture parameter sets, flags indicatingthe CU/PU/TU partitioning of an LCU, the prediction modes for the CUs,quantization information, and the quantized transform coefficients forthe CUs. The entropy coding component 436 also codes relevant data fromthe in-loop filters (described below).

The LCU processing includes an embedded decoder. As any compliantdecoder is expected to reconstruct an image from a compressed bitstream, the embedded decoder provides the same utility to the videoencoder. Knowledge of the reconstructed input allows the video encoderto transmit the appropriate residual energy to compose subsequentpictures and to compute checksums to be included in hash SEI message inthe compressed bit stream.

The quantized transform coefficients for each CU are provided to aninverse quantization component (IQ) 412, which outputs a reconstructedversion of the transform result from the transform component 404. Thedequantized transform coefficients are provided to the inverse transformcomponent (IDCT) 414, which outputs estimated residual informationrepresenting a reconstructed version of a residual CU. The inversetransform component 414 receives the transform unit size used togenerate the transform coefficients and applies inverse transform(s) ofthe specified size to the transform coefficients to reconstruct theresidual values. The reconstructed residual CU is provided to thecombiner 438.

The combiner 438 adds the original predicted CU to the residual CU togenerate a reconstructed CU, which becomes part of reconstructed picturedata. The reconstructed picture data is stored in a buffer (not shown)for use by the intra-prediction estimation component 424.

Various in-loop filters may be applied to the reconstructed picture datato improve the quality of the reference picture data used forencoding/decoding of subsequent pictures. The in-loop filters mayinclude a deblocking filter component 430, a sample adaptive offsetfilter (SAO) component 432, and an adaptive loop filter (ALF) component434. The in-loop filters 430, 432, 434 are applied to each reconstructedLCU in the picture and the final filtered reference picture data isprovided to the storage component 418. In some embodiments, the ALFfilter component 434 may not be present.

FIG. 5 is a flow diagram of a method for adaptive quantization in whicha base quantization parameter (base QP) for a coding unit is adapted(modulated) based on measured activity in the CU and based on TU size inthe CU. This method may be performed, for example, by the quantizationcomponent 406 of FIG. 4. Initially, an activity measure for the codingunit is computed 500. The activity measure may be representative of thedegree of sensitivity of the human visual system to information in theCU, i.e., may be representative of amount of texture in the CU. Anysuitable technique for computing the activity measure may be used. Somesuitable techniques that may are described in U.S. Pat. App. Pub. No.2011/0122942.

The base QP for the CU is then adapted 502 to QP′ based on the computedactivity measure. In general, if the activity measure indicates that theamount of activity in the block is high, the base QP is increased bysome amount to reduce bit rate as typically coding artifacts are lessvisible in more complex areas. Further, if the activity measureindicates that the amount of activity in the block is low, the base QPis decreased by some amount to improve visual quality as codingartifacts may be more visible in smoother areas. Any suitable techniquefor adapting the base QP based on the activity measure may be used. Somesuitable techniques that may be used are described in U.S. Pat. App.Pub. No. 2011/0122942. Note that the base QP value may not always bechanged. However, for convenience of description, the output of thisstep is referred to as QP′ even if QP′=base QP.

A delta amount to be used to further adapt the value of QP′ is thendetermined 504 based on the size of the TUs in the CU. In someembodiments, delta=0 for all TU sizes except the largest TU size, e.g.,32×32. In such embodiments, the value of delta for the largest TU sizemay be any suitable predetermined value. For example, the value of deltafor the largest TU size may be empirically determined using arepresentative set of video sequences that the encoder is designed toencode. The value of delta for the largest TU size may be selected suchthat decreasing QP′ for CUs with TUs of this largest size by deltasuppresses discontinuities from neighboring CUs and thus decreasesblocking artifacts caused by using this largest TU size.

In some embodiments, the value of delta may be non-zero for the largestTU size, and for one or more of the smaller TU sizes. The delta valuesfor the smaller TU sizes are smaller than that of the largest TU sizes.For example, if the largest TU size is 32×32 and the next largest TUsize is 16×16, the delta values for both the 32×32 TU size and the 16×16TU size may be non-zero, with the delta value for the 16×16 TU sizebeing smaller than that of the 32×32 TU size. In such embodiments, thevalue of delta for each of the TU sizes may be any suitablepredetermined values. For example, the values of delta for each of theTU sizes may be empirically determined using a representative set ofvideo sequences that the encoder is designed to encode.

QP′ is then adapted 506 based on the value of delta to produce the finalQP value, i.e., QP=QP′+delta. This final QP value is then use toquantize 508 the transform coefficients of the CU. In some embodiments,to avoid abrupt changes in the final QP, the value of the final QP isclipped to reduce the difference between the final QP and the QP of theprevious CU. Let the QP of the previous CU be denoted as QPprev. Thefinal QP may be clipped such that |QP−Qprev|≦d, i.e., if QP>QPprev+d,then QP is set to QPprev+d, and if QP<QPprev−d, QP is set to QPprev−d.Any suitable value of the distance d may be used.

Embodiments of the methods and encoders described herein may beimplemented for virtually any type of digital system (e.g., a desk topcomputer, a laptop computer, a tablet computing device, a netbookcomputer, a handheld device such as a mobile (i.e., cellular) phone, apersonal digital assistant, a digital camera, etc.). FIG. 6 is a blockdiagram of an example digital system suitable for use as an embeddedsystem that may be configured to adapt (modulate) the base QPs of CUsbased on activity (texture) in the CUs and based on the TU size used forthe CUs as described herein during encoding of a video stream. Thisexample system-on-a-chip (SoC) is representative of one of a family ofDaVinci™ Digital Media Processors, available from Texas Instruments,Inc. This SoC is described in more detail in “TMS320DM6467 Digital MediaSystem-on-Chip”, SPRS403G, December 2007 or later, which is incorporatedby reference herein.

The SoC 600 is a programmable platform designed to meet the processingneeds of applications such as video encode/decode/transcode/transrate,video surveillance, video conferencing, set-top box, medical imaging,media server, gaming, digital signage, etc. The SoC 600 provides supportfor multiple operating systems, multiple user interfaces, and highprocessing performance through the flexibility of a fully integratedmixed processor solution. The device combines multiple processing coreswith shared memory for programmable video and audio processing with ahighly-integrated peripheral set on common integrated substrate.

The dual-core architecture of the SoC 600 provides benefits of both DSPand Reduced Instruction Set Computer (RISC) technologies, incorporatinga DSP core and an ARM926EJ-S core. The ARM926EJ-S is a 32-bit RISCprocessor core that performs 32-bit or 16-bit instructions and processes32-bit, 16-bit, or 8-bit data. The DSP core is a TMS320C64x+TM core witha very-long-instruction-word (VLIW) architecture. In general, the ARM isresponsible for configuration and control of the SoC 600, including theDSP Subsystem, the video data conversion engine (VDCE), and a majorityof the peripherals and external memories. The switched central resource(SCR) is an interconnect system that provides low-latency connectivitybetween master peripherals and slave peripherals. The SCR is thedecoding, routing, and arbitration logic that enables the connectionbetween multiple masters and slaves that are connected to it.

The SoC 600 also includes application-specific hardware logic, on-chipmemory, and additional on-chip peripherals. The peripheral set includes:a configurable video port (Video Port I/F), an Ethernet MAC (EMAC) witha Management Data Input/Output (MDIO) module, a 4-bit transfer/4-bitreceive VLYNQ interface, an inter-integrated circuit (I2C) businterface, multichannel audio serial ports (McASP), general-purposetimers, a watchdog timer, a configurable host port interface (HPI);general-purpose input/output (GPIO) with programmable interrupt/eventgeneration modes, multiplexed with other peripherals, UART interfaceswith modem interface signals, pulse width modulators (PWM), an ATAinterface, a peripheral component interface (PCI), and external memoryinterfaces (EMIFA, DDR2). The video port I/F is a receiver andtransmitter of video data with two input channels and two outputchannels that may be configured for standard definition television(SDTV) video data, high definition television (HDTV) video data, and rawvideo data capture.

As shown in FIG. 6, the SoC 600 includes two high-definitionvideo/imaging coprocessors (HDVICP) and a video data conversion engine(VDCE) to offload many video and image processing tasks from the DSPcore. The VDCE supports video frame resizing, anti-aliasing, chrominancesignal format conversion, edge padding, color blending, etc. The HDVICPcoprocessors are designed to perform computational operations requiredfor video encoding such as motion estimation, motion compensation,intra-prediction, transformation, quantization, and in-loop filtering.Further, the distinct circuitry in the HDVICP coprocessors that may beused for specific computation operations is designed to operate in apipeline fashion under the control of the ARM subsystem and/or the DSPsubsystem.

As was previously mentioned, the SoC 600 may be configured to adapt(modulate) the base QPs of CUs based on activity (texture) in the CUsand based on the TU size used for the CUs as described herein duringencoding of a video stream described herein during encoding of a videostream. For example, the coding control of the video encoder of FIG. 4may be executed on the DSP subsystem or the ARM subsystem and at leastsome of the computational operations of the block processing, includingthe intra-prediction and inter-prediction of mode selection,transformation, quantization, and entropy encoding may be executed onthe HDVICP coprocessors.

OTHER EMBODIMENTS

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.

Embodiments of the methods, encoders, and decoders described herein maybe implemented in hardware, software, firmware, or any combinationthereof. If completely or partially implemented in software, thesoftware may be executed in one or more processors, such as amicroprocessor, application specific integrated circuit (ASIC), fieldprogrammable gate array (FPGA), or digital signal processor (DSP). Thesoftware instructions may be initially stored in a computer-readablemedium and loaded and executed in the processor. In some cases, thesoftware instructions may also be sold in a computer program product,which includes the computer-readable medium and packaging materials forthe computer-readable medium. In some cases, the software instructionsmay be distributed via removable computer readable media, via atransmission path from computer readable media on another digitalsystem, etc. Examples of computer-readable media include non-writablestorage media such as read-only memory devices, writable storage mediasuch as disks, flash memory, memory, or a combination thereof.

Although method steps may be presented and described herein in asequential fashion, one or more of the steps shown in the figures anddescribed herein may be performed concurrently, may be combined, and/ormay be performed in a different order than the order shown in thefigures and/or described herein. Accordingly, embodiments should not beconsidered limited to the specific ordering of steps shown in thefigures and/or described herein.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A method for encoding a video sequence in a videoencoder, the method comprising: adapting a quantization parameter of ablock of pixels in a picture of the video sequence based on a transformblock size of the block of pixels to determine a final quantizationparameter; and quantizing transform coefficients of the block of pixelsusing the final quantization parameter.
 2. The method of claim 1,wherein adapting a quantization parameter comprises: computing anactivity measure for the block of pixels; adapting a base quantizationparameter of the block of pixels based on the activity measure todetermine the quantization parameter; determining a delta value forfurther adapting of the quantization parameter, wherein the delta valueis determined based on the transform block size of the block of pixels;and adapting the quantization parameter based on the delta value todetermine the final quantization parameter.
 3. The method of claim 2,wherein a delta value for a largest transform block size is non-zero anddelta values for all other transform block sizes are zero.
 4. The methodof claim 3, wherein the largest transform block size is 32×32.
 5. Themethod of claim 2, wherein a first delta value for a largest transformblock size is non-zero, and a second delta value for a transform blocksize smaller than the largest transform block size is non-zero, whereinthe first delta value is larger than the second delta value.
 6. Anapparatus for encoding a video sequence, the apparatus comprising: meansfor adapting a quantization parameter of a block of pixels in a pictureof the video sequence based on a transform block size of the block ofpixels to determine a final quantization parameter; and means forquantizing transform coefficients of the block of pixels using the finalquantization parameter.
 7. The apparatus of claim 6, wherein the meansfor adapting a quantization parameter: computes an activity measure forthe block of pixels; adapts a base quantization parameter of the blockof pixels based on the activity measure to determine the quantizationparameter; determines a delta value for further adapting of thequantization parameter, wherein the delta value is determined based onthe transform block size of the block of pixels; and adapts thequantization parameter based on the delta value to determine the finalquantization parameter.
 8. The apparatus of claim 7, wherein a deltavalue for a largest transform block size is non-zero and delta valuesfor all other transform block sizes are zero.
 9. The apparatus of claim8, wherein the largest transform block size is 32×32.
 10. The apparatusof claim 7, wherein a first delta value for a largest transform blocksize is non-zero, and a second delta value for a transform block sizesmaller than the largest transform block size is non-zero, wherein thefirst delta value is larger than the second delta value.
 11. Anon-transitory computer readable medium storing software instructionsthat, when executed by a processor, cause a method for encoding a videosequence to be performed, the method comprising: adapting a quantizationparameter of a block of pixels in a picture of the video sequence basedon a transform block size of the block of pixels to determine a finalquantization parameter; and quantizing transform coefficients of theblock of pixels using the final quantization parameter.
 12. Thenon-transitory computer readable medium of claim 11, wherein adapting aquantization parameter comprises: computing an activity measure for theblock of pixels; adapting a base quantization parameter of the block ofpixels based on the activity measure to determine the quantizationparameter; determining a delta value for further adapting of thequantization parameter, wherein the delta value is determined based onthe transform block size of the block of pixels; and adapting thequantization parameter based on the delta value to determine the finalquantization parameter.
 13. The non-transitory computer readable mediumof claim 12, wherein a delta value for a largest transform block size isnon-zero and delta values for all other transform block sizes are zero.14. The non-transitory computer readable medium of claim 13, wherein thelargest transform block size is 32×32.
 15. The non-transitory computerreadable medium of claim 12, wherein a first delta value for a largesttransform block size is non-zero, and a second delta value for atransform block size smaller than the largest transform block size isnon-zero, wherein the first delta value is larger than the second deltavalue.